//
//  Wallet.m
//  Bees
//
//  Created by NowYouCanSee on 2018/12/26.
//  Copyright © 2018 xiaohan. All rights reserved.
//

#import "Wallet.h"
@implementation Receive

@end

@implementation Wallet

- (NSArray<TokenInfo*>*)contracts{
    if (_contractsJson.length) {
        _contracts = [NSArray modelArrayWithClass:TokenInfo.class json:_contractsJson];
        return _contracts;
    }
    return @[];
}
- (NSArray<TokenInfo*>*)myTokenList{
    if (_myTokenListJson.length) {
        _myTokenList = [NSArray modelArrayWithClass:TokenInfo.class json:_myTokenListJson];
        return _myTokenList;
    }
    return @[];
}
- (NSArray<NSString*>*)codes{
    if (_codesJson.length) {
        _codes = [_codesJson jsonValueDecoded];
        return _codes;
    }
    
    return @[];
}
- (NSArray<NSString*>*)deleteCodes{
    if (_deleteCodesJson.length) {
        _deleteCodes = [_deleteCodesJson jsonValueDecoded];
        return _deleteCodes;
    }
    
    return @[];
}
//- (NSString*)contractsJson{
//    if (_contracts.count) {
//        _contractsJson = [_contracts modelToJSONString];
//    }
//    return _contractsJson?:@"";
//}

- (NSArray<DappInfo*>*)whiteDapps{
    _whiteDapps = [NSArray modelArrayWithClass:DappInfo.class json:_whiteDappJson];
    return _whiteDapps?:@[];
}
//- (NSString*)whiteDappJson{
//    return _whiteDapps.count?[_whiteDapps modelToJSONString]:@"";
//}
 
@end
